kvm: x86, powerpc: do not allow clearing largepages debugfs entry
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 30 Sep 2019 16:48:44 +0000 (18:48 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 19 Nov 2019 01:43:33 +0000 (01:43 +0000)
commitc4e43b58a6bafc98c72d7e869797131ba5cd8c33
treeeac0d4a9252a54944213840b7988206a04adfca3
parentf96ed6083330f0157cd06954eb15851dcf93b0fa
kvm: x86, powerpc: do not allow clearing largepages debugfs entry

The largepages debugfs entry is incremented/decremented as shadow
pages are created or destroyed.  Clearing it will result in an
underflow, which is harmless to KVM but ugly (and could be
misinterpreted by tools that use debugfs information), so make
this particular statistic read-only.

Cc: kvm-ppc@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Gbp-Pq: Topic bugfix/x86/itlb_multihit
Gbp-Pq: Name 0001-kvm-x86-powerpc-do-not-allow-clearing-largepages-deb.patch
arch/powerpc/kvm/book3s.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c